package com.blacktea.cloudconsumerfeignorder.feign;

import com.blacktea.cloudapicommon.beans.CommonResult;
import com.blacktea.cloudapicommon.beans.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @description:
 * @author: black tea
 * @date: 2021/7/31 13:42
 */
@Component
@FeignClient(value = "CLOUD-PROVIDER-PAYMENT-SERVICE")
public interface PaymentFeignService {

    @GetMapping(value = "/payment/{id}")
    CommonResult<Payment> getPaymentById(@PathVariable("id") Long id);

    @GetMapping("/feign/test/timeout/{s}")
    CommonResult timeout(@PathVariable("s") Long time);
}
